﻿using System.Collections.Generic;
using System.Collections.Specialized;
using System.ComponentModel.Composition;

using ExtensibleEventViewer.Core.Primitives;


namespace ExtensibleEventViewer.Core.Interfaces
{

	/// <summary>
	/// Defines methods for retrieving event log records
	/// </summary>
	[ContractType]
	public interface IEventLogProvider
	{
		/// <summary>
		/// Retrieves list of EventLog entries by defined <paramref name="selectionCriteria">selection criteria</paramref>
		/// </summary>
		/// <param name="selectionCriteria">Selection criteria</param>
		/// <param name="computerName">Name of the computer from which event log records will be retrieved</param>
		/// <returns>List of EventLog entries</returns>
		IEnumerable<EventLogRecord> Select(NameValueCollection selectionCriteria, string computerName);

		/// <summary>
		/// Selects list of available Event Logs on specific computer
		/// </summary>
		/// <param name="computerName">Name of the computer from which event log list will be retrieved</param>
		/// <returns>List of available Event Logs</returns>
		IEnumerable<EventLogEntity> GetEventLogList(string computerName);

		/// <summary>
		/// Selects list of available Event Logs on specific computer
		/// </summary>
		/// <param name="name">Name of the event log</param>
		/// <param name="computerName">Name of the computer where eventlog is located</param>
		/// <returns>List of available Event Logs</returns>
		EventLogEntity GetEventLog(string name, string computerName);

		/// <summary>
		/// Gets provider name
		/// </summary>
		string ProviderName
		{ 
			get;
		}

		/// <summary>
		/// Gets provider's unique identifier
		/// </summary>
		string ProviderID
		{ 
			get;
		}
	}
}
